/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __PQ_PlayerUnit_H__
#define __PQ_PlayerUnit_H__

#include "Unit.h"

namespace PQClient
{
	/*This class represent player selected character.
	*/
	class PlayerUnit
		: public Unit
	{
	public:
		enum AnimType
		{

			Player_Anim_Idle,
			Player_Anim_Run,

			Player_Anim_Count

		};
		PlayerUnit(Ogre::String name,PQEngine::SceneObject* scene, Unit::Type type);

		//update the unit
		void update(float deltaT);
		void setPosition(float x,float y,float z);
		Ogre::Vector3 getPosition();

		void setScale(float x,float y,float z);

		const Ogre::Quaternion &getOrientation();

	public:
		MeshObject* getMeshObject();
		void changeRightWeapon();
		void changeLeftWeapon();

		void setVisible(bool show);

		void setupBody();
		void setupEquipment();
		void loadDestroyer();
		void loadAlchemist();
		void loadVanquisher();

		void selectAnim(AnimType type);

	protected:
		MeshObject* _meshObject;//

		Ogre::Entity* _leftWeapon;
		Ogre::Entity* _rightWeapon;
		bool _show;


	};
}
#endif
